package com.zretc.controller;

import com.zretc.entity.SalaryDistribute;
import com.zretc.service.StatisticService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/statistic")
public class StatisticController {
    @Autowired
    private StatisticService statisticService;
    @RequestMapping("/employeeMount")
    public Map<String,Integer> employeeCountStatistic(){
        Map<String, Integer> map = statisticService.employeeCountStatistic();
        return map;
    }
    @RequestMapping("/salaryDistribute")
    List<SalaryDistribute> salaryDistribute(){
       return statisticService.salaryDistribute();
    }
    @RequestMapping("/boyVsGirl")
    public Map<String, Integer> boyVsGirl() {
        return statisticService.boyVsGirl();
    }

}
